package net.edisoft.view;

import java.util.List;

import net.edisoft.controller.InvoiceController;
import net.edisoft.model.Detail;
import net.edisoft.model.Header;

import com.opensymphony.xwork2.ActionSupport;

public class InvoiceAction extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = -8268259182581018315L;
	private Header invoice;
	private Detail details;
	private List<Header> invoiceList;
	private List<Detail> detailsList;
	private Long id;

	private InvoiceController linkController;

	public InvoiceAction() {
		linkController = new InvoiceController();
	}

	public String execute() {
		this.invoiceList = linkController.list();
		this.detailsList = linkController.listDetail();
		return SUCCESS;
	}
	
	public Header getInvoice() {
		return invoice;
	}

	public void setInvoice(Header invoice) {
		this.invoice = invoice;
	}

	public List<Header> getInvoiceList() {
		return invoiceList;
	}

	public void setInvoiceList(List<Header> invoiceList) {
		this.invoiceList = invoiceList;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public InvoiceController getLinkController() {
		return linkController;
	}

	public void setLinkController(InvoiceController linkController) {
		this.linkController = linkController;
	}

	public List<Detail> getDetailList() {
		return detailsList;
	}

	public void setDetailList(List<Detail> detailList) {
		this.detailsList = detailList;
	}

	public Detail getDetails() {
		return details;
	}

	public void setDetails(Detail details) {
		this.details = details;
	}


}
